<!DOCTYPE html>
<html lang="en" >
<head>
    <title>Atomsk - Option roll - Pierre Hirel</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" media="screen" type="text/css" title="Default" href="./default.css" />
    <link rel="icon" href="../img/atomsk_logo.png" type="image/png" />
</head>
   
<body>

<p><a href="./index.html">Back to main menu</a></p>

<h2>Option: roll</h2>

<h4>Syntax</h4>

<p><code>-roll &#60;direction&#62; &#60;&theta;&#62; &#60;axis&#62;</code></p>


<h4>Description</h4>

<p>This option allows to "roll" the system, i.e. bend it in the form of a circle, around a Cartesian axis.</p>

<p>The user must provide the following parameters:</p>

<ul>
  <li><strong>direction:</strong> direction that will be "rolled", it must be x, y or z, referring to Cartesian axes.</li>
  <li><strong>&theta;:</strong> angle of rotation (in degrees).</li>
  <li><strong>axis:</strong> axis of rotation, i.e. the axis of the cylinder, it must be x, y or z, and must be normal to the given &#60;direction&#62; (i.e. they must be different).</li>
</ul>

<p>With this option, the &#60;direction&#62; is rolled by an angle &theta; around the given &#60;axis&#62;.</p>

<p>An angle &theta;=0° means no bending (i.e. no transformation), while &theta;=360° means rolling the system to form a tube or cylinder (see <strong>Fig. 1</strong> below). The axis of the tube is aligned with the given &#60;axis&#62;, and its radius is <em>R</em>=(180 <em>L</em>)/(2&pi;&theta;), where <em>L</em> is the length of the box along the given &#60;direction&#62;. Beware that the larger the angle &theta;, the smaller the radius. For large angles it is recommended that the system is pseudo-2D, i.e. very thin, in the plane formed by the &#60;direction&#62; and the &#60;axis&#62;.</p>

<p>This option modifies the box dimensions. Along the Cartesian direction that is normal to both the &#60;direction&#62; and &#60;axis&#62;, the box dimension is increased by <em>R</em>[1-cos(&theta;)] so that the rolled system fits in the box.</p>

<p>Note that if you give an angle &theta; larger than 360°, the system will be rolled more than once, resulting in some atoms to overlap.</p>

<p>If a selection was defined (with the <a href="./option_select.html">option <code>-select</code></a>) then only the selected atoms are rolled.</p>

<hr>
<object type="img/svg+xml" data="../img/opt_roll.svg"><img src="../img/opt_roll.png" alt="" /></object>
<p><strong>Fig. 1</strong> - <em>Illustration of the option "-roll", with &#60;direction&#62;=X and &#60;axis&#62;=Z. Left: initial system. Middle: system bent with a small angle &theta;. Right: system rolled all the way with an angle &theta;=360°.</em></p>
<hr>




<h4>Default</h4>

<p>By default the system is not rolled.</p>



<h4>Examples</h4>

<ul>
<li><code class="command">atomsk initial.cfg -roll X 10 Z final.xyz</code>
<p>This will bend the system to form an angle of 10 degrees around Z.</p></li>

<li><code class="command">atomsk unitcell.cfg -duplicate 20 20 1 -roll X 360 Y final.xyz</code>
<p>This will read the file <code>unitcell.cfg</code>, <a href="./option_duplicate.html">duplicate it</a> to form a pseudo-2D sheet in the XY plane, and roll the X direction of the system so that it forms a closed cylinder along the Y axis.</p></li>

</ul>


<p><a href="./index.html">Back to main menu</a></p>

</body>

</html>
